import multiprocessing
import os
import time

def funcA():
    for i in range(5):
        # print(i, ".....", os.getpid())
        print(f"{i}funcA的进程编号是{os.getpid()}")
        time.sleep(1)




def funcB():
    for i in range(6,11):
        print(f"{i}funcA的父进程编号是{os.getppid()}")
        time.sleep(1)


if __name__ == '__main__':
    a_pro = multiprocessing.Process(target=funcA)
    a_pro.start()
    b_pro = multiprocessing.Process(target=funcB)
    b_pro.start()
    print(f"主进程的进程编号是{os.getpid()}")